<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>积分录入</title>
<link rel="stylesheet" type="text/css"
	th:href="@{/static/css/normalize.css}" />
<link rel="stylesheet" type="text/css" th:href="@{/static/css/demo.css}" />
<link rel="stylesheet" type="text/css"
	th:href="@{/static/css/bootstrap.min.css}" />
<link rel="stylesheet" type="text/css"
	th:href="@{/static/css/jifen.css}" />
<!--[if IE]-->
<script th:src="@{/static/js/html5.js}" /></script>
<!--[endif]-->
<script th:inline="javascript">
		/*<![CDATA[*/
			var me = [[${addIntegralMessage}]];
					 if(me != '' && me != null){
					 	alert(me);
					 } 
		/*]]>*/
		</script>
</head>
<body>
	<div class="r-top">
		<div class="titile">
			<div class="img">
				<i class="glyphicon glyphicon-list-alt"></i>
			</div>
			<div class="detail-info">
				<span class="p1">积分录入</span><br /> <span class="p2"><i
					class="glyphicon glyphicon-grain"></i>&nbsp;表格格式应该为&nbsp;&nbsp;.xls或.xlsx</span>
			</div>
		</div>
		<div class="tab">
			<span><a href="javascript:void(0)" class="tab-left">批量录入</a> <span
				class="blank"></span> <a href="javascript:void(0)" class="tab-right">单个录入</a></span>
		</div>
	</div>
	<div class="r-main">
		<div class="mass">
			<form th:action="@{/integral/import.do}" th:method="post"
				enctype="multipart/form-data">
				<div class="term">
					<span>学期</span> <select name="semester" class="choice">
						<option th:each="semester:${allSemester}"
							th:text="${semester.semesterName}"></option>
					</select> <input type="hidden" th:value="${session.user.name}"
						name="name">
				</div>
				<div class="put" id="uploa">
					<div class="area">
						<p>点击此处进行上传</p>
						<i></i>
					</div>
				</div>

				<input type="file" name="upfile" id="upload"
					style="position:relative; left:-90px"><br /> <input
					type="submit" value="提交" id="submit" style="display: none;">
			</form>
			<div class="putfile" id="submi">
				<a class="btn-file"> <i></i> <span>上传文档</span>
				</a>
			</div>
		</div>
		<div class="single">
			<form th:action="@{/integral/addIntegral.do}" th:object="${integral}" th:method="post">
				<div class="myinput">
					<label class="form-inline"><span>学号</span>
						<input type="text" name="studentId" id="" value="" required="required"/></label> 
					<label class="form-inline"><span>姓名</span>
						<input type="text" name="studentName" id="" value="" required="required"/></label> 
					<label class="form-inline"><span>班级</span>
						<select name="grades" >
							<option th:each="class:${allClass}" th:text="${class.className}"></option>
						</select>
					</label> 
					<label class="form-inline"><span>积分</span>
						<input type="text" name="score" id="" value="" required="required"/></label> 
					<label class="form-inline"><span>原因</span>
						<input type="text" name="reason" id="" value="" required="required"/></label> 
					<label class="form-inline"><span>部室</span>
						<select name="clubroom" >
							<option th:each="room:${allRoom}" th:text="${room.clubroomName}"></option>
						</select>
					</label> 
					<label class="form-inline"><span>时间</span>
						<input type="text" name="time" id="" value="" required="required"/></label> 
					<label class="form-inline"><span>学期</span>
						<select name="intSemester">
							<option th:each="semester:${allSemester}" th:text="${semester.semesterName}"></option>
						</select>
					</label>
					<label class="form-inline"><span>录入时间</span>
						<input type="datetime" name="creatime" id="getBookTime" value="" readonly="readonly" class="date"/></label> 
					<label class="form-inline"><span>录入者</span>
						<input type="text" name="name" id="" th:value="${session.user.name}" readonly="readonly" class="oname"/></label><br />
					<div class="mybtn">
						<input type="submit" name="cancel" id="cancel" value="录入"
							class="btn btn-default" /> <span></span> 
					<input type="button"
							name="cancel" id="cancel" value="取消" class="btn btn-default" />
					</div>
				</div>

			</form>
		</div>
	</div>
	<script type="text/javascript" th:src="@{/static/js/jquery.min.js}"></script>
	<script type="text/javascript" th:src="@{/static/js/jifen.js}"></script>
	<script th:inline="javascript">
		window.onload = function() {
			function getDate() {
				var today = new Date();
				var date = (today.getFullYear()) + "-" + (today.getMonth() + 1) + "-" + today.getDate();
				return date;
			}
			window.setInterval(function() {
				document.getElementById("getBookTime").value = getDate();
			}, 1000);
		}
		function change(id1, id2) {
			function getId(a) {
				return document.getElementById(a)
			}
			getId(id1).onclick = function() {
				getId(id2).click()
			}
		}
		change("uploa", "upload");
		change("submi", "submit");
	</script>
</body>
</html>
